import React from 'react'
import {Button, Tooltip} from 'antd'
import {PropTypes} from 'prop-types'



export class ToggleButton extends React.Component {
  constructor(props) {
    super(props)
  }

  render() {
    const {id, tooltip, buttonIcon, buttonName,  shape, ...attributes} = this.props
    let buttonShape = "circle"
    if(shape){
      buttonShape = shape
    }

    Button.propTypes.shape = PropTypes.oneOf(['circle', 'circle-outline','ellipse'])
    return (
        <Tooltip placement="bottom" title={tooltip}>
          <Button color="light" id={id} shape={buttonShape}  {...attributes}>{buttonName}<i id={id}
                                                                                          className={buttonIcon} disabled></i></Button>
        </Tooltip>
    )
  }
}
